#include <bits/stdc++.h>

using namespace std;

int main()
{
	int old_number, new_number;
	int gewei, shiwei, baiwei, qianwei, wanwei;
	cout << "Input a numbr:";
	cin >> old_number;
	cout << endl;
	gewei   = (old_number/1)       %10;
	shiwei  = (old_number/10)      %10;
	baiwei  = (old_number/100)     %10;
	qianwei = (old_number/1000)    %10;
	wanwei  = (old_number/10000)   %10;
	
	/*
	gewei   = (old_number%10)       /1;
	shiwei  = (old_number%100)      /10;
	baiwei  = (old_number%1000)     /100;
	qianwei = (old_number%10000)    /1000;
	wanwei  = (old_number%100000)   /10000;
	*/
		
	new_number = gewei * 10000 + \
		         shiwei * 1000 + \
		         baiwei  * 100 + \
		         qianwei  * 10 + \
		         wanwei    * 1;
	cout << new_number;	 
 } 
